# 这个文件主要是修改配置文件后启动jar


#修改端口 eg: port: 9000

sed -i "s/#EUREKA_PORT#/${PORT}/g" application.yml

#修改eureka集群地址 替换掉这个变量即可 #EUREKA_CLUSTER_URL# eg: http://172.168.1.79:9000/eureka/,http://172.168.1.81:9000/eureka/,http://172.168.1.80:9000/eureka/

CLUSTER_URL=$(echo ${CLUSTER_URL} |sed -e 's/\//\\\//g')

sed -i "s/#CLUSTER_URL#/${CLUSTER_URL}/g" application.yml

#修改 EUREKA_HOSTNAME
sed -i "s/#EUREKA_HOSTNAME#/${EUREKA_HOSTNAME}/g" application.yml

#查看 application.yml 内容
cat application.yml

java -jar eureka-cluster.jar --spring.config.location=application.yml > eureka-server.log


